package com.ruoyi.algorithm.dict.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.algorithm.dict.entity.Dictionary;
import com.ruoyi.algorithm.dict.entity.DictionaryType;

/**
 *
 */
public interface DictionaryService {

    Page<Dictionary> page(Page<Dictionary> page, Dictionary dictionary, String orderBy, Boolean isAsc) throws NoSuchFieldException;

    Page<DictionaryType> pageDictType(Page<DictionaryType> page, DictionaryType dictionaryType, String orderBy, Boolean isAsc) throws NoSuchFieldException;

    String getValueByKey(String typeKey, String key);

    void add(Dictionary dictionary);

    boolean update(Dictionary dictionary);

    void deleteById(Long id);

    void addDictType(DictionaryType dictionaryType);

    boolean updateDictType(DictionaryType dictionaryType);

    void deleteDictTypeById(Long id);

    IPage<Dictionary> getDictListByTypeId(IPage<Dictionary> page, String typeKey);
}
